package com.qs.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author author
 * @since 2023-11-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("qs_goods")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(exist = false)
    private Integer key;

    private Integer storeId;

    @TableField(exist = false)
    private String store;

    private String brand;

    private String category;

    private String name;

    private String image;

    private double price;

    private String detail;

    private String unit;

    /**
     * 商品库存量
     */
    private Integer number;

    /**
     * 商品浏览量
     */
    private Integer browse;

    /**
     * 锁定库存量
     */
    private Integer lockStock;
    /**
     * 商品销量
     */
    private Integer sale;

    private String status;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
